package com.jd.basic.utils;

import com.jd.basic.jwt.UserInfo;

/**
 * @author 小林同学
 * @version 1.0
 * @description: TODO
 * @date 2023/3/14 19:45
 */
public class ThreadLocalUtil {
    private static ThreadLocal<UserInfo> threadLocal = new ThreadLocal<>();

    public static void setThreadLocal(UserInfo userInfo){
        threadLocal.set(userInfo);
    }

    public static UserInfo getThreadLocal(){
        return threadLocal.get();
    }
    public static void remove(){
        threadLocal.remove();
    }

}
